package a1_p04_ak_fh;


import org.jgraph.graph.DefaultEdge;
import org.jgrapht.Graph;


public class Aufgabe1 {
	

	public static void main(String [] args) {
		IOHelper IOHelper = new IOHelper();

		System.out.println("###### ---- GRAPH 1 ----######");
		
		Graph<String, DefaultEdge> graph = IOHelper.readGraphFile("graph1.gka");
		GraphVis.startvis(graph,0);

		System.out.println("BFS");
		System.out.println(BreadthFirstSearch.BFS(graph, "a", "f").toString());
		
		System.out.println("DFS");
		System.out.println(DepthFirstSearch.DFS(graph, "a", "f").toString());		
		
		
		System.out.println("###### ---- GRAPH 2 ----######");
		Graph<String, DefaultEdge> graph2 = IOHelper.readGraphFile("graph2.gka");
		GraphVis.startvis(graph2,1);

		System.out.println("BFS");

		System.out.println(BreadthFirstSearch.BFS(graph2, "a", "f").toString());

		
		System.out.println("DFS");

		System.out.println(DepthFirstSearch.DFS(graph2, "a", "f").toString());	

		/*System.out.println(graph.toString());
		
		IOHelper.writeGraphFile(graph, "/home/fabian/EclipseWorkspace/gka_wise12/test.gka");*/
	}


}
